package com.kai.steering.data.service.entity.vo;

import cn.hutool.core.bean.BeanUtil;
import com.kai.steering.data.service.entity.domainObject.AnswerDO;
import com.kai.steering.data.service.entity.domainObject.AnswerJournalDO;
import com.kai.steering.data.service.entity.po.AnswerJournal;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "AnswerJournalVO对象", description = "答案日志业务视图")
public class AnswerJournalVO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "id")
    private String id;
    @ApiModelProperty(value = "题目ID")
    private String questionId;
    @ApiModelProperty(value = "答案ID")
    private String answerId;
    @ApiModelProperty(value = "用户ID")
    private String userId;
    @ApiModelProperty(value = "回答")
    private String replyAnswer;
    @ApiModelProperty(value = "用户题目ID")
    private String userQuestionId;
    @ApiModelProperty(value = "分类ID")
    private String classificationId;
    @ApiModelProperty(value = "回答详情")
    private String replyAnswerDetails;
    @ApiModelProperty(value = "创建时间")
    private String creationDatetime;
    @ApiModelProperty(value = "创建人管理员id或者用户id")
    private String founder;
    @ApiModelProperty(value = "存在0删除1")
    private String usable;
    @ApiModelProperty(value = "删除日期")
    private String deleteDatetime;
    @ApiModelProperty(value = "结果")
    private double result;
    @ApiModelProperty(value = "结果详情")
    private String resultDetails;
    public AnswerJournalVO(AnswerJournalDO answerJournalDO) {
        this.convertAnswerJournalVO(answerJournalDO);
    }
    public AnswerJournalVO convertAnswerJournalVO (AnswerJournalDO answerJournalDO){
        BeanUtil.copyProperties(answerJournalDO,this);
        return this;
    }
}
